package com.bajiao.common.constant;

/**
 * 优惠劵状态枚举
 */
public enum CouponStatusEnum {

   USE(1,"可用"),
   NO(0,"不可用"),


   ;

   private Integer type;

   private String typeName;

   CouponStatusEnum(Integer type, String typeName) {
      this.type = type;
      this.typeName = typeName;
   }

   /**
    * 根据类型的名称，返回类型的枚举实例。
    *
    * @param typeName 类型名称
    */
   public static CouponStatusEnum getTypeName(String typeName) {
      for (CouponStatusEnum type : CouponStatusEnum.values()) {
         if (type.getTypeName().equals(typeName)) {
            return type;
         }
      }
      return null;
   }

   public Integer getType() {
      return this.type;
   }

   public String getTypeName() {
      return this.typeName;
   }
}
